<div class="content">
	<div class="tab_bar">
		<ul>
			<li class="tab_index" onclick="setTabContent(this);">添加碎片</li>
		</ul>
		<button class="btn_tabbar" onclick="mySubmitForm(this);" return="chip/list.do?currentPageNo=1">保 存</button> 
	</div> 
	<form id="myForm" action="chip/save.do" method="post">
	<div class="tab_content">
		<div class="tab_item tab_show"> 
			<table class="table_for_add">
				<tbody> 
					<tr>
						<th width="140">碎片名称： </th>
						<td align="left">
							<input class="input_for_add" id="name" name="name" type="text" placeholder="请填写碎片名称。" />
							<span id="Validform_checktip"></span>
						</td>
					</tr>
					<tr class="rowBgColor">
						<th>碎片标识： </th>
						<td><input class="input_for_add" name="mark" type="text" placeholder="请填写碎片标识符。"/></td>
					</tr>
					<tr>
						<th>碎片内容：</th>
						<td></td>
					</tr>
					<tr>
						<td colspan="2" >  
							<script type="text/plain" id="mushroomeditor" name="content"  style="height:350px;"></script>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	</form> 
</div>
<script type="text/javascript">
$(function(){
	if(window.editor != null){
		window.editor.destroy();
	}
	
	
	 //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    window.editor = UE.getEditor('mushroomeditor');
 	 
	window.editor.ready(function(){
		$("#title").focus();//纠正显示
	});
	 

});

function mySubmitForm(obj){
 	window.editor.sync();//手动提交需要手动同步编辑器数据 
	submitActionForm(obj);
} 
</script>